<?php
class activitiesController extends Controller
{
    function showIndex()
    {
        if ($this->_post['keyWord'] != "") {
            $where = " and title like '%" . $this->_post['keyWord'] . "%'";
        }
        $pagination_sql = "select * from activity where to_days(now())<=to_days(endDate) $where order by startDate asc";
        $pagination_count_sql = "select count(1) as count from activity  where to_days(now())<=to_days(endDate) $where order by startDate asc";
        $this->putIntoPage("pagination", $this->modules->Activity->pagination($pagination_sql, $pagination_count_sql));
        $this->render("hyhd");
    }

    function show()
    {
        $id = $this->_get['id'];
        $this->putIntoPage("activity", $this->modules->Activity->load($id));
        $this->render("activity");
    }

}

?>